package com.atguigu.springcloud.myhandler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.atguigu.springcloud.entity.CommonResult;
import com.sun.deploy.security.BlockedException;

/**
 * @USER: dayu
 * @DATE: 2020/4/16
 * @DESCRIPTION: 自定义处理限流异常
 */
public class CustomBlockerHandler {

    public static CommonResult handlerException001(BlockException exception){
        return new CommonResult(4444,exception.getClass().getCanonicalName()+"\t 按客户定义 global 1 号方法 ");
    }
    public static CommonResult handlerException002(BlockException exception){
        return new CommonResult(4444,exception.getClass().getCanonicalName()+"\t 按客户定义 global 2 号方法");
    }
}
